package com.kan.awaits;

import java.io.Serializable;

import com.kan.awaits.exception.DBAccessException;

public interface IdentifierGenerator
{
	/**
	 * The configuration parameter holding the entity name
	 */
	public static final String ENTITY_NAME = "entity_name";

	/**
	 * Generate a new identifier.
	 * 
	 * @param session
	 * @param object
	 *            the entity or toplevel collection for which the id is being generated
	 * 
	 * @return a new identifier
	 * @throws HibernateException
	 */
	public Serializable generate(Session session, Object object) throws DBAccessException;

}
